{include file="default/base/header" /}
<link rel="stylesheet" href="{$Think.HOME_SITE_ROOT}/css/Seller.css">
<link rel="stylesheet" href="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/css/lightbox.min.css">
<script src="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/js/lightbox.min.js"></script>
<div class='page'>
    <?php if($goods['is_href']==1){ ?>
    <a href="/index.php/home/sellergoodsadd/store_goods_detail.html?commonid={$goods.goods_commonid}" class="btn" title="返回上一步">返回上一步</a>
    <?php } ?>
    <table border="0" cellpadding="0" cellspacing="0" class="ds-default-table">
        <thead>
        <tr>
            <th colspan="6">基本信息</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <th style="width: 100px;" >商品名称及规格名：</th>
            <td style="width: 300px;"  >{$goods.goods_name}</td>
            <th style="width: 100px;"  >商品编码：</th>
            <td>{$goods.goods_code|default='未设置'}</td>
            <th style="width: 100px;"  >商品厂家：</th>
            <td>{$goods.goods_factory|default='未设置'}</td>
        </tr>
        <tr>
            <th>商品分类：</th>
            <td>{$goods_info.gc_name}</td>
            <th>商品品牌：</th>
            <td>{$goods_info.brand_name}</td>
            <th>生产/贴牌</th>
            <td><?php if(empty($goods['goods_production'])){
                  echo '未设置';
               }else if($goods['goods_production']==1){ ?>
                生产
                <?php }else if($goods['goods_production']==2){ ?>
                贴牌
                <?php }?>
            </td>
        </tr>
        <tr>
            <th >商品产地：</th>
            <td>{$goods.address|default='未设置'}</td>
            <th>商品发货地：</th>
            <td>{$goods.hair_address|default='未设置'}</td>
            <th>送货设置：</th>
            <td>
                <?php if(empty($goods['waybill_type'])){
                  echo '未设置';
               }else if($goods['waybill_type']==1){ ?>
                自提+送货上门
                <?php }else if($goods['waybill_type']==2){ ?>
                自提
                <?php }else if($goods['waybill_type']==3){?>
                送货上门
                <?php } ?>
            </td>
        </tr>
        <tr>
            <th >抛货/重货：</th>
            <td> <?php if(empty($goods['is_w_v'])){
                  echo '未设置';
               }else if($goods['is_w_v']==1){ ?>
                抛货
                <?php }else if($goods['is_w_v']==2){ ?>
                重货
                <?php } ?></td>
            <th>商品重量(kg)：</th>
            <td>{$goods.weight|default='未设置'}</td>
            <th>商品包装：</th>
            <td>{$goods.packing|default='未设置'}</td>
        </tr>
        <tr>
            <th>包装尺寸-长(m)：</th>
            <td>{$goods.packing_long|default='未设置'}</td>
            <th>包装尺寸-宽(m)：</th>
            <td>{$goods.packing_width|default='未设置'}</td>
            <th>包装尺寸-高(m)：</th>
            <td>{$goods.packing_high|default='未设置'}</td>
        </tr>

        </tbody>
    </table>
    <?php if(empty($goods['area'])){  ?>
    <table border="0" cellpadding="0" cellspacing="0" class="ds-default-table">
        <thead>
        <tr>
            <th colspan="6">商品销售信息</th>
        </tr>
        </thead>
        <tr>
            <th  style="width: 100px;" >商品销售区域：</th>
            <td>未设置</td>
        </tr>
    </table>
    <?php }else{ ?>
    <table border="0" cellpadding="0" cellspacing="0" class="ds-default-table">
        <thead>
        <tr>
            <th colspan="6">商品销售信息</th>
        </tr>
        </thead>
        <tr>
            <th  style="width: 100px;" >商品销售区域：</th>
            <td>{$goods['area_name']}</td>
        </tr>
    </table>
    <?php  }?>
    <table border="0" cellpadding="0" cellspacing="0" class="ds-default-table">
        <tr>
            <th  style="width: 100px;" >是否支持换货：</th>
            <td><?php if(!isset($goods['change_goods'])&&$goods['change_goods']==""){ echo '未设置'; }else if($goods['change_goods']==1){echo '支持';}else if($goods['change_goods']==0){echo '不支持';} ?></td>
            <th  style="width: 100px;" >是否支持退货：</th>
            <td><?php if(!isset($goods['return_goods'])&&$goods['return_goods']==""){ echo '未设置'; }else if($goods['return_goods']==1){echo '支持';}else if($goods['return_goods']==0){echo '不支持';} ?></td>
        </tr>
    </table>

    <table border="0" cellpadding="0" cellspacing="0" class="ds-default-table">
        <thead>
        <tr>
            <th colspan="6">基本文件信息</th>
        </tr>
        </thead>
        <?php if(empty($goods['files_info'])){  ?>
        <tr>
            <th>说明书文件：</th>
            <td><ul>
                <li>暂无上传</li>
            </ul></td>

        </tr>
        <?php }else{ ?>
        <tr>
            <th>说明书文件：</th>
            <td><ul>
                <?php foreach($goods['files_info']['old_file_name'] as $k=>$v){  ?>
                <li><a href="{$http_name}/{$goods['files_info']['new_file_name'][$k]}" target="_blank">{$v}</a></li>
                <?php } ?>
            </ul></td>

        </tr>
        <?php  }?>
    </table>

</div>
<script>
    $(function(){
        $('#file_button').click(function(){
            var files = $(this).val();
            $.ajax({
                //请求方式
                type : "POST",
                //请求地址
                url : "getWord",
                //数据，json字符串
                data : {'files':files},
                //请求成功
                success : function(result) {
                    alert(result);
                },
                //请求失败，包含具体的错误信息
                error : function(e){
                    console.log(e.status);
                    console.log(e.responseText);
                }
            });
        });
    });









</script>